using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace FytSoa.Application.Crm;

/// <summary>
/// 联系人
/// </summary>
public class CrmContactDto : AppEntity
{
    /// <summary>
    /// 所属客户
    /// </summary>
    [Required]
    public long CustomerId { get; set; }
    
    /// <summary>
    /// 所属客户
    /// </summary>
    public CrmCustomerDto CustomerObj { get; set; }

    /// <summary>
    /// 是否紧急联系人
    /// </summary>
    [Required]
    public bool IsUrgent { get; set; } = false;

    /// <summary>
    /// 姓名
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 手机号码
    /// </summary>
    public string Mobile { get; set; }

    /// <summary>
    /// 座机号
    /// </summary>
    public string Tel { get; set; }

    /// <summary>
    /// 邮箱
    /// </summary>
    public string Email { get; set; }

    /// <summary>
    /// 性别
    /// </summary>
    public string Sex { get; set; }

    /// <summary>
    /// 职务
    /// </summary>
    public string Post { get; set; }

    /// <summary>
    /// 所属区县
    /// </summary>
    public string County { get; set; }

    /// <summary>
    /// 详细地址
    /// </summary>
    public string Address { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }

    /// <summary>
    /// 状态1=正常0=关闭
    /// </summary>
    [Required]
    public bool Status { get; set; } = true;

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    public string UpdateUser { get; set; }


}

/// <summary>
/// 联系人
/// </summary>
public class CrmContactSimpleDto : AppEntity
{
    /// <summary>
    /// 姓名
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 联系人电话
    /// </summary>
    public string Mobile { get; set; }
}